package com.elitel.common.utils;

public class HexUtils {
    public static String hexDecode(String hex) {
        StringBuilder output = new StringBuilder();
        for (int i = 0; i < hex.length(); i += 2) {
            // 每两个字符为一组，转换为十六进制整数
            String hexPair = hex.substring(i, i + 2);
            int charCode = Integer.parseInt(hexPair, 16);
            // 将整数转换为字符
            output.append((char) charCode);
        }
        return output.toString();
    }

}
